package top.xiaoshuaila.moments.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.xiaoshuaila.moments.mapper.DynamicMapper;
import top.xiaoshuaila.moments.pojo.Dynamic;

import java.util.List;

@Service
public class IndexServiceImpl implements IndexService {
    @Autowired
    private DynamicMapper dynamicMapper;

    @Override
    public List<Dynamic> getDynamicById(long id,int page) {
        return dynamicMapper.getDynamicById(id,page*5,5);
    }

    @Override
    public int gettotal(long id) {
        return dynamicMapper.gettotal(id);
    }
}
